const COMMON_PRESETS = preload("res://scripts/procedural_buildings/presets/common_preset_bk.gd")

const PART_GROUP = COMMON_PRESETS.PART_GROUP
const PANEL_TYPE = COMMON_PRESETS.PANEL_TYPE
const INSET_TYPE = COMMON_PRESETS.INSET_TYPE

enum INTERNAL_TYPE {
	staircase_section,
	staircase_walls_base,
	staircase_walls_entrance,
	staircase_entrance_floor,
	staircase_walls_window,
	
	flat_walls_end_l_1,
	flat_walls_end_l_2,
	flat_walls_end_l_3,
	flat_walls_end_l_4,
	flat_walls_end_l_1_balc,
	flat_walls_end_l_2_balc,
	flat_walls_end_l_3_balc,
	flat_walls_end_l_4_balc,
	flat_walls_end_l_1_roof,
	flat_walls_end_l_2_roof,
	flat_walls_end_l_3_roof,
	flat_walls_end_l_4_roof,
	
	flat_walls_end_r_1,
	flat_walls_end_r_2,
	flat_walls_end_r_3,
	flat_walls_end_r_4,
	flat_walls_end_r_1_balc,
	flat_walls_end_r_2_balc,
	flat_walls_end_r_3_balc,
	flat_walls_end_r_4_balc,
	flat_walls_end_r_1_roof,
	flat_walls_end_r_2_roof,
	flat_walls_end_r_3_roof,
	flat_walls_end_r_4_roof,
	
	flat_walls_mid_1,
	flat_walls_mid_2,
	flat_walls_mid_3,
	flat_walls_mid_4,
	flat_walls_mid_1_balc,
	flat_walls_mid_2_balc,
	flat_walls_mid_3_balc,
	flat_walls_mid_4_balc,
	flat_walls_mid_1_roof,
	flat_walls_mid_2_roof,
	flat_walls_mid_3_roof,
	flat_walls_mid_4_roof,
}

const INTERNALS: Dictionary[INTERNAL_TYPE, PackedScene] = {
	INTERNAL_TYPE.staircase_section: preload("res://scenes/building_prefabs/internals/1_335/staircase_section.tscn"),
	INTERNAL_TYPE.staircase_walls_base: preload("res://scenes/building_prefabs/internals/1_335/staircase_walls_base.tscn"),	
	INTERNAL_TYPE.staircase_walls_entrance: preload('res://scenes/building_prefabs/internals/1_335/staircase_walls_entrance.tscn'),
	INTERNAL_TYPE.staircase_entrance_floor: preload('res://scenes/building_prefabs/internals/1_335/staircase_entrance_floor.tscn'),
	INTERNAL_TYPE.staircase_walls_window: preload('res://scenes/building_prefabs/internals/1_335/staircase_walls_window.tscn'),
	
	INTERNAL_TYPE.flat_walls_end_l_1: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_1.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_2: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_2.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_3: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_3.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_4: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_4.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_1_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_1_balc.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_2_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_2_balc.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_3_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_3_balc.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_4_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_4_balc.tscn'),
	
	INTERNAL_TYPE.flat_walls_end_r_1: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_1.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_2: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_2.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_3: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_3.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_4: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_4.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_1_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_1_balc.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_2_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_2_balc.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_3_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_3_balc.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_4_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_4_balc.tscn'),
	
	INTERNAL_TYPE.flat_walls_mid_1: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_1.tscn'),
	INTERNAL_TYPE.flat_walls_mid_2: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_2.tscn'),
	INTERNAL_TYPE.flat_walls_mid_3: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_3.tscn'),
	INTERNAL_TYPE.flat_walls_mid_4: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_4.tscn'),
	INTERNAL_TYPE.flat_walls_mid_1_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_1_balc.tscn'),
	INTERNAL_TYPE.flat_walls_mid_2_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_2_balc.tscn'),
	INTERNAL_TYPE.flat_walls_mid_3_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_3_balc.tscn'),
	INTERNAL_TYPE.flat_walls_mid_4_balc: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_4_balc.tscn'),
	
	INTERNAL_TYPE.flat_walls_end_l_1_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_1_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_2_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_2_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_3_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_3_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_l_4_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_l_4_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_1_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_1_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_2_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_2_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_3_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_3_roof.tscn'),
	INTERNAL_TYPE.flat_walls_end_r_4_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_end_r_4_roof.tscn'),
	INTERNAL_TYPE.flat_walls_mid_1_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_1_roof.tscn'),
	INTERNAL_TYPE.flat_walls_mid_2_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_2_roof.tscn'),
	INTERNAL_TYPE.flat_walls_mid_3_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_3_roof.tscn'),
	INTERNAL_TYPE.flat_walls_mid_4_roof: preload('res://scenes/building_prefabs/internals/1_335/flat_walls_mid_4_roof.tscn'),
}

const i_335_preset_side_section_preset_l_base = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'root'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_entrance,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_entrance_floor,
					'anchor_to': 'anchor_staircase_base'
				},
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_base,
					'anchor_to': 'anchor_staircase_base'
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		# side wall
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_base_sealed_begin,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_base_sealed_end,
			'anchor_to': 'anchor_straight'
		},
	]
}
const i_335_preset_side_section_preset_l = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'root'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_entrance,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_entrance,
					'anchor_to': 'anchor_staircase_walls',
					'children': [
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.staircase_section,
							'anchor_to': 'anchor_staircase'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_1,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_2,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_3,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_4,
							'anchor_to': 'anchor_flat_4'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_1_roof,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_2_roof,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_3_roof,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_4_roof,
							'anchor_to': 'anchor_flat_4'
						}
					]
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		# side wall
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_left_sealed_begin,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_right_sealed_end,
			'anchor_to': 'anchor_straight'
		},
	]
}
const i_335_preset_side_section_preset_l_balc = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'root'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_ladder_window,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_window,
					'anchor_to': 'anchor_staircase_walls',
					'children': [
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.staircase_section,
							'anchor_to': 'anchor_staircase'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_1_balc,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_2_balc,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_3_balc,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_4_balc,
							'anchor_to': 'anchor_flat_4'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_1_roof,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_2_roof,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_3_roof,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_l_4_roof,
							'anchor_to': 'anchor_flat_4'
						}
					]
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		# side wall
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_left_sealed_begin,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_right_sealed_end,
			'anchor_to': 'anchor_straight'
		},
	]
}

const i_335_preset_side_section_preset_r_base = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_entrance,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_entrance_floor,
					'anchor_to': 'anchor_staircase_base'
				},
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_base,
					'anchor_to': 'anchor_staircase_base'
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		# side wall
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_base_sealed_begin,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_base_sealed_end,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
	]
}
const i_335_preset_side_section_preset_r = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_entrance,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_entrance,
					'anchor_to': 'anchor_staircase_walls',
					'children': [
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.staircase_section,
							'anchor_to': 'anchor_staircase'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_1,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_2,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_3,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_4,
							'anchor_to': 'anchor_flat_4'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_1_roof,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_2_roof,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_3_roof,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_4_roof,
							'anchor_to': 'anchor_flat_4'
						},
					]
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		# side wall
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_left_sealed_begin,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_right_sealed_end,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	]
}
const i_335_preset_side_section_preset_r_balc = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_ladder_window,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_window,
					'anchor_to': 'anchor_staircase_walls',
					'children': [
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.staircase_section,
							'anchor_to': 'anchor_staircase'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_1_balc,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_2_balc,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_3_balc,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_4_balc,
							'anchor_to': 'anchor_flat_4'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_1_roof,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_2_roof,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_3_roof,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_end_r_4_roof,
							'anchor_to': 'anchor_flat_4'
						},
					]
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		# side wall
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_left_sealed_begin,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_31_window_right_sealed_end,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_corner_left'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	]
}

const i_335_preset_medium_section_preset_base = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_entrance,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_entrance_floor,
					'anchor_to': 'anchor_staircase_base'
				},
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_base,
					'anchor_to': 'anchor_staircase_base'
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_base_vent,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_base,
			'anchor_to': 'anchor_straight'
		},
	]
}
const i_335_preset_medium_section_preset = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_entrance,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_entrance,
					'anchor_to': 'anchor_staircase_walls',
					'children': [
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.staircase_section,
							'anchor_to': 'anchor_staircase'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_1,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_2,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_3,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_4,
							'anchor_to': 'anchor_flat_4'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_1_roof,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_2_roof,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_3_roof,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_4_roof,
							'anchor_to': 'anchor_flat_4'
						}
					]
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	]
}
const i_335_preset_medium_section_preset_balc = {
	'forward_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_ladder_window,
			'anchor_to': 'anchor_straight',
			'children': [
				{
					'part_group': PART_GROUP.internal_sections,
					'part_type': INTERNAL_TYPE.staircase_walls_window,
					'anchor_to': 'anchor_staircase_walls',
					'children': [
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.staircase_section,
							'anchor_to': 'anchor_staircase'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_1_balc,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_2_balc,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_3_balc,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_4_balc,
							'anchor_to': 'anchor_flat_4'
						},
						
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_1_roof,
							'anchor_to': 'anchor_flat_1'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_2_roof,
							'anchor_to': 'anchor_flat_2'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_3_roof,
							'anchor_to': 'anchor_flat_3'
						},
						{
							'part_group': PART_GROUP.internal_sections,
							'part_type': INTERNAL_TYPE.flat_walls_mid_4_roof,
							'anchor_to': 'anchor_flat_4'
						}
					]
				}
			]
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	],
	'back_pass': [
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_32_balcony,
			'anchor_to': 'anchor_straight'
		},
		{
			'part_group': PART_GROUP.external_panel,
			'part_type': PANEL_TYPE.panel_26_window,
			'anchor_to': 'anchor_straight'
		},
	]
}
